﻿using System.ComponentModel;
using System.Text.Json.Serialization;

namespace SwaggerDoc.Api
{

    /// <summary>
    /// 用户入参请求
    /// </summary>
    public class UserRequest
    {
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public string Sex { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
    }

    /// <summary>
    /// 枚举
    /// </summary>
    public enum EnumType
    {
        /// <summary>
        /// 可用
        /// </summary>
        [Description("可用")]
        Able,
        /// <summary>
        /// 不可用
        /// </summary>
        [Description("不可用")]
        UnAble

    }

    /// <summary>
    /// 天气
    /// </summary>
    public class WeatherForecastDTO
    {
        /// <summary>
        /// Name
        /// </summary>
        [JsonPropertyOrder(1)]
        public string Name { get; set; }
        /// <summary>
        /// 现在
        /// </summary>
        [JsonPropertyOrder(2)]
        public DateTime DateTime { get; set; }
        /// <summary>
        /// 日期
        /// </summary>
        [JsonPropertyOrder(3)]//序列化排序
        [JsonPropertyName("n_date")]//别名
        [JsonIgnore]//忽略不显示
        public DateTime NullDate { get; set; }
        /// <summary>
        /// Int数字
        /// </summary>
        [JsonPropertyOrder(4)]
        public int IntNumber { get; set; }
        /// <summary>
        /// Long数字
        /// </summary>
        [JsonPropertyOrder(5)]
        public long LongNumber { get; set; }
        /// <summary>
        /// Decimal数字
        /// </summary>
        [JsonPropertyOrder(5)]
        public Decimal DecimalNumber { get; set; }
        /// <summary>
        /// 总结
        /// </summary>
        [JsonPropertyOrder(6)]
        public string Summary { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [JsonPropertyOrder(7)]
        public EnumType Status { get; set; }

    }

    public class PostTest
    {
        //public EnumType Status { get; set; }

        public int IntNumber { get; set; }
        public long? LongNumber { get; set; }

        public double? DoubleNumber { get; set; }

        public decimal? DecimalNumber { get; set; }

        public float? FloatNumber { get; set; }

        public Guid? Guid { get; set; }

        public bool? Bool { get; set; }
    }

    /// <summary>
    /// SwaggerModel模型
    /// </summary>
    public class SwaggerModel
    {
        /// <summary>
        /// EnumType类型
        /// </summary>
        public EnumType EnumType { get; set; }
    }

    /// <summary>
    /// 订单请求
    /// </summary>
    public class OrderRequest
    {
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }
    }
    /// <summary>
    /// 登入模型
    /// </summary>
    public class LoginModel
    {
        /// <summary>
        /// 名字
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
    }

    /// <summary>
    /// JwtOption
    /// </summary>
    public class JwtOption
    {
        /// <summary>
        /// 密钥
        /// </summary>
        public string? SecretKey { get; set; }

        /// <summary>
        /// 发行人
        /// </summary>
        public string? Issuer { get; set; }

        /// <summary>
        /// 拥护者
        /// </summary>
        public string? Audience { get; set; }

        /// <summary>
        /// 过期时间分钟
        /// </summary>
        public int Expire { get; set; }
    }
}
